//package hadoop_4;
//
//import org.apache.hadoop.conf.Configuration;
//import org.apache.hadoop.fs.FSDataOutputStream;
//import org.apache.hadoop.fs.FileSystem;
//import org.apache.hadoop.fs.Path;
//import java.io.BufferedInputStream;
//import java.io.FileInputStream;
//import java.io.InputStream;
//import java.net.URI;
//
//public class Test1 {
//    public static void main(String[] args) throws Exception {
//        Configuration conf=new Configuration();//1.Configuration  配置类
//
//        String src="/home/hadoop/a.txt";//虚拟机的文件路径
//        String dst="hdfs://master:9000/hdfs/word.txt";//hadoop文件路径
//        FileSystem fs=FileSystem.get(URI.create(dst),conf);//2.FileSystem
//
//        FSDataOutputStream  out=fs.create( new Path(dst));
//        InputStream in=new BufferedInputStream( new FileInputStream(src));
//        //3. FSDataOutputSteam
//        //4. copy
//        //关闭流
//    }
//}//57
//
//
//
//
//
//
